<template>
    <f7-page>
        <f7-navbar title="添加管理员" back-link="返回"></f7-navbar>
        <div class="list-block" style="margin-bottom: 10px;">
            <ul>
                <li>
                    <div class="item-content">
                        <!--<div class="item-media"><i class="icon icon-form-name"></i></div>-->
                        <div class="item-inner">
                            <div class="item-title label">姓名</div>
                            <div class="item-input">
                                <input type="text" placeholder="请输入" v-model="userName" @keyup="changed()">
                            </div>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="item-content">
                        <!--<div class="item-media"><i class="icon icon-form-name"></i></div>-->
                        <div class="item-inner">
                            <div class="item-title label">手机号</div>
                            <div class="item-input">
                                <input type="number" placeholder="请输入" v-model="userPhoneno" @keyup="changed()">
                            </div>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
        <div>
            <span style="color: grey;padding-left: 15px;">对方使用手机号+验证码方式即可登录</span>
        </div>
        <div class="content-block">
            <a href="#" class="close-login-screen button button-big button-fill" @click="addPersonRequest()">完成</a>
        </div>
    </f7-page>
</template>

<script>
    import data from '../../../src/data/index'
    export default{
        data(){
            return{
                userName:'',
                userPhoneno:''
            }
        },
        methods:{
            changed(){

            },
            addPersonRequest(){
                let that = this;
                data.gover.addGoverUser(this.userName,this.userPhoneno,this.$route.params.RegionId,this.$route.params.RegionName,function () {
                    that.$f7.modal({
                        title:'麦子提示您',
                        verticalButtons: true,
                        buttons: [
                            {
                                text: '微信通知他',
                                onClick: function() {

                                }
                            },
                            {
                                text: '短信通知他',
                                onClick: function() {

                                }
                            },
                            {
                                text: '回首页',
                                onClick: function() {
                                    that.$router.back();
                                }
                            }
                        ]
                    })
                })
            }
        }
    }
</script>